﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using CommunitySystemModel;

namespace CommunitySystem.Web.Service
{
    // 注意: 使用“重构”菜单上的“重命名”命令，可以同时更改代码和配置文件中的接口名“IEmpBasicService”。
    [ServiceContract]
    public interface IEmpBasicService
    {
        [OperationContract]
        byte[] ExportDW(ObservableCollection<BianZhiModel> tjfx);
          [OperationContract]
        byte[] ExportDW1(string orgid);


        [OperationContract]
        bool DeteleCheGai(int ID);
        [OperationContract]
        string GetDengLuJueSe(string loginName);
        [OperationContract]
        ObservableCollection<DiaoDongModel> GetEmp_BasicInfoModelByCardNo(string cardno, int orgid);
        #region 基本信息
        [OperationContract]
        string GetDengLuOrg(string loginName);
        [OperationContract]
        int GetEmp_BasicInfoCounts(string OrgID, string EmpID, string name, string orgtype, string empstatus, string highQueryCondition, bool keji, bool chuji);
        [OperationContract]
        ObservableCollection<Emp_BasicInfoModel> GetEmp_BasicInfo(string OrgID, string EmpID, string name, string orgname, int start, int end,
            string empstatus, string highQueryCondition, bool? keji, bool? chuji);
        [OperationContract]
        int AddEmp_BasicInfo(Emp_BasicInfoModel item);
        [OperationContract]
        bool UpdateEmp_BasicInfo(Emp_BasicInfoModel item);
        [OperationContract]
        bool DeleteEmp_BasicInfo(string ID);

        [OperationContract]
        ObservableCollection<Emp_BasicInfoModel> GetDanWeiEmp_BasicInfos(string OrgID, string empstatus, bool keji, bool chuji);
        #endregion

        #region 职务信息
        [OperationContract]
        ObservableCollection<Emp_Duty> GetEmp_Dutys(string EmpID, int ID);

        [OperationContract]
        ObservableCollection<Emp_Duty> GetEmp_DutysJobStatus(string EmpID, int ID);

        [OperationContract]
        bool AddEmp_Duty(Emp_Duty item);

        [OperationContract]
        bool UpdateEmp_Duty(Emp_Duty item);

        [OperationContract]
        bool DeteleEmp_Duty(int ID);

        #endregion

        #region 简历信息
        [OperationContract]
        ObservableCollection<Emp_ResumeModel> GetEmp_Resume(string EmpID, int ID);
        [OperationContract]
        ObservableCollection<Emp_ResumeModel> GetEmp_ResumeBYJL(string EmpID, int ID);

        [OperationContract]
        bool AddEmp_Resume(Emp_ResumeModel item);

        [OperationContract]
        bool UpdateEmp_ResumeModel(Emp_ResumeModel item);

        [OperationContract]
        bool DeteleEmp_ResumeModel(int ID);

        #endregion

        #region 学历信息
        [OperationContract]
        ObservableCollection<Emp_EducationModel> GetEmp_EducationModel(string EmpID, int ID);
        [OperationContract]
        ObservableCollection<Emp_EducationModel> GetEmp_EducationModelByJL(string EmpID, int ID);

        [OperationContract]
        bool AddEmp_EducationModel(Emp_EducationModel item);

        [OperationContract]
        bool UpdateEmp_EducationModel(Emp_EducationModel item);

        [OperationContract]
        bool DeteleEmp_EducationModel(int ID);

        #endregion

        #region 学位信息
        [OperationContract]
        ObservableCollection<Emp_DegreeModel> GetEmp_DegreeModel(string EmpID, int ID);
        [OperationContract]
        ObservableCollection<Emp_DegreeModel> GetEmp_DegreeModelBYJL(string EmpID, int ID);

        [OperationContract]
        bool AddEmp_DegreeModel(Emp_DegreeModel item);

        [OperationContract]
        bool UpdateEmp_DegreeModel(Emp_DegreeModel item);

        [OperationContract]
        bool DeteleEmp_DegreeModel(int ID);

        #endregion

        #region 考核信息
        [OperationContract]
        ObservableCollection<Emp_AssessmentModel> GetEmp_AssessmentModel(string EmpID, int ID);
        [OperationContract]
        ObservableCollection<Emp_AssessmentModel> GetEmp_AssessmentModelBySND(string EmpID, int ID);
        [OperationContract]
        bool AddEmp_AssessmentModel(Emp_AssessmentModel item);

        [OperationContract]
        bool UpdateEmp_AssessmentModel(Emp_AssessmentModel item);

        [OperationContract]
        bool DeteleEmp_AssessmentModel(int ID);

        #endregion

        #region 奖惩信息
        [OperationContract]
        ObservableCollection<Emp_RewardInfoModel> GetEmp_RewardInfoModel(string EmpID, int ID);
        [OperationContract]
        ObservableCollection<Emp_RewardInfoModel> GetEmp_RewardInfoModelByJL(string EmpID, int ID);

        [OperationContract]
        bool AddEmp_RewardInfoModel(Emp_RewardInfoModel item);

        [OperationContract]
        bool UpdateEmp_RewardInfoModel(Emp_RewardInfoModel item);

        [OperationContract]
        bool DeteleEmp_RewardInfoModel(int ID);

        #endregion

        #region 处分信息
        [OperationContract]
        ObservableCollection<Emp_PunishmentModel> GetEmp_PunishmentModel(string EmpID, int ID);
        [OperationContract]
        ObservableCollection<Emp_PunishmentModel> GetEmp_PunishmentModelByJL(string EmpID, int ID);

        [OperationContract]
        bool AddEmp_PunishmentModel(Emp_PunishmentModel item);

        [OperationContract]
        bool UpdateEmp_PunishmentModel(Emp_PunishmentModel item);

        [OperationContract]
        bool DeteleEmp_PunishmentModel(int ID);

        #endregion

        #region 家庭信息
        [OperationContract]
        ObservableCollection<Emp_FamilyRelationModel> GetEmp_FamilyRelationModel(string EmpID, int ID);
        [OperationContract]
        ObservableCollection<Emp_FamilyRelationModel> GetEmp_FamilyRelationModelByJL(string EmpID, int ID);

        [OperationContract]
        bool AddEmp_FamilyRelationModel(Emp_FamilyRelationModel item);

        [OperationContract]
        bool UpdateEmp_FamilyRelationModel(Emp_FamilyRelationModel item);

        [OperationContract]
        bool DeteleEmp_FamilyRelationModel(int ID);

        #endregion

        #region 日志管理
        [OperationContract]
        ObservableCollection<System_MarkManageModel> GetSystemMark(string dengluren, int start, int end, string caozuoren, string caozuoriqi);

        [OperationContract]
        bool AddSystem_Mark(string ZiJi, string OldContent, string NewContent, int EmpID, string CaoZuoFangShi,
                            string ZiDuan, string DengLuRen);
        [OperationContract]
        bool UpdateSystem_Mark(System_MarkManageModel item);
        #endregion

        #region 组织机构管理
        [OperationContract]
        ObservableCollection<OrgForHRModel> GetOrgForHRModel(int OrgID);
        [OperationContract]
        ObservableCollection<OrgForHRModel> GetOrgForHRModelbyIDs(string OrgID);

        [OperationContract]
        bool AddOrgForHRModel(OrgForHRModel item);

        [OperationContract]
        bool UpdateOrgForHRModel(OrgForHRModel item);

        [OperationContract]
        bool DeteleOrgForHRModel(int ID);
        #endregion

        #region 编制管理
        [OperationContract]
        ObservableCollection<BianZhiModel> GetBianZhiModel(string OrgID, int ID);
        [OperationContract]
        bool AddBianZhiModel(BianZhiModel item);
        [OperationContract]
        bool UpdateBianZhiModel(BianZhiModel item);

        [OperationContract]
        ObservableCollection<BianZhiModel> GetBianZhiModelShiYou(int OrgID);
        [OperationContract]
         bool DeleteBianZhiModel(BianZhiModel item);
        [OperationContract]
        ObservableCollection<BianZhiModel> GetBianZhiModelForTongChou(int OrgID);
        [OperationContract]
        bool TCXZ(string type, int shu, string ids, string name);
        [OperationContract]
        bool QuXiaoTongChou(string type,int orgid);
        [OperationContract]
        bool CanTCXZ(string type, string ids);
        #endregion

        [OperationContract]
        FileTransferStream GetPersonnelInfoExcel(int id, string UserName);

        [OperationContract]
        bool CanDaoRuAll(ObservableCollection<Emp_BasicInfoModel> InEmpBasicModels);

        [OperationContract]
        bool ShanChuDaoRuAll(ObservableCollection<Emp_BasicInfoModel> InEmpBasicModels);

        [OperationContract]
        bool DaoRuAll(ObservableCollection<Emp_BasicInfoModel> InEmpBasicModels,
                      ObservableCollection<Emp_EducationModel> InEmpEducation,
                      ObservableCollection<Emp_DegreeModel> InEmpDegree,
                      ObservableCollection<Emp_ResumeModel> InEmpResume,
                      ObservableCollection<Emp_Duty> InEmpDuty, ObservableCollection<Emp_RewardInfoModel> InEmpReward,
                      ObservableCollection<Emp_PunishmentModel> InEmpPunish,
                      ObservableCollection<Emp_AssessmentModel> InEmpAssenssment,
                      ObservableCollection<Emp_FamilyRelationModel> InEmpFamily);
        [OperationContract]
        PeiZhiLieModel GetLieByUserID(int userID);
        [OperationContract]
        bool UpdateLie(PeiZhiLieModel item);

        [OperationContract]
        string ExportPersonnelInfoPosition(int empid, int position);

        [OperationContract]
        int GetSystemMarkCounts(string dengluren, string caozuoren, string caozuoriqi);

        [OperationContract]
        int GetCheGaiCounts(string caozuoren, string caozuoriqi, string endcaozuoriqi, string orgid, string status, int keyid, string dengjibiandong);
        [OperationContract]
        ObservableCollection<CheGaiModel> GetCheGai(string caozuoren, string caozuoriqi, string endcaozuoriqi, string orgid, string status,
                                                    int start, int end, int keyid, string dengjibiandong);
        [OperationContract]
        CheGaiModel GetOneCheGai(int id);
        [OperationContract]
        bool UpdateCheGai(CheGaiModel item);
        [OperationContract]
        void InsertCheGai(int EmpID, string Type, string dengjibiandongtype);
        [OperationContract]
        bool UpdateCheGaiAll(ObservableCollection<CheGaiModel> item);
        [OperationContract]
        ObservableCollection<string> GetKeyIDs(string caozuoriqi, string endcaozuoriqi, string orgid);
        [OperationContract]
        ObservableCollection<ZhiJiModel> GetZhiJiModel(int ID);
        [OperationContract]
        bool AddZhiJiModel(ZhiJiModel item);
        [OperationContract]
        bool UpdateZhiJiModel(ZhiJiModel item);
        //[OperationContract]
        //FileTransferStream GetExcelFile(ObservableCollection<CheGaiModel> models);
        [OperationContract]
        ObservableCollection<BianZhiModel> GetBianZhi_JiBenModel(string OrgID);
        [OperationContract]
        bool UpdateBianZhi_JiBenModel(int id, string demo);
        [OperationContract]
        ObservableCollection<BianZhiModel> GetBianZhiDetailModel(string OrgID, string jigoumingcheng);
        [OperationContract]
        ObservableCollection<BianZhiModel> GetBianZhiDetail_JieYongModel(string OrgID, string type);
        [OperationContract]
        void UpdateBianZhiDetail_JieYongModel(string BianZhiID, string type, BianZhiModel model, int isguoduxing, string guoduxing, bool isnew);
        [OperationContract]
        ObservableCollection<BianZhiModel> GetBianZhiDetail_YiJieYongModel(int ID, string type, int zhengfu);
        [OperationContract]
        ObservableCollection<Emp_BasicInfoModel> GetEmp_BasicInfoModelByKeShi(int orgid, string type, string keshiname, string zairenjianren, string empid);
        [OperationContract]
        bool UpdateChaoZhiQingKuang(int id, string demo);
        [OperationContract]
        bool InsertChaoZhi(int bianzhiid, string type, string guoduxingzhishu, string bianzhiname);
         [OperationContract]
        string GetChaoZhiShu(int bianzhiid, string type);
        [OperationContract]
         ObservableCollection<Emp_BasicInfoModel> GetEmpIds(int bianzhiid, string type, int isguoduxing);
        [OperationContract]
        ObservableCollection<Emp_BasicInfoModel> GetEmpIds_guodu(int bianzhiid, string type, int isguoduxing);
        [OperationContract]
        bool UpdateBianZhiAnPaiRenYuan(ObservableCollection<int> empid, int bianzhijieyongid, string jieyongorguodu, string type);
         [OperationContract]
        bool CanTuiHuanZhiShu(int bianzhijieyongid);
         [OperationContract]
         bool TuiHuanZhiShu(int bianzhijieyongid, int empid);

         [OperationContract]
         ObservableCollection<Emp_BasicInfoModel> GetEmp_BasicInfoByCon(string con);

        #region  表单管理
         [OperationContract]
         ObservableCollection<Emp_BDGLModel> GetSYQMKH(string con, int index, int pagesize);
         [OperationContract]
         int GetSYQMKHCount(string con);
         [OperationContract]
         bool SYQMKH_SB(Emp_BDGLModel model);
        #endregion

        #region 空字段导出
         ObservableCollection<Emp_BasicInfoModel> GetEmp(string con);
        #endregion
    }
}
